<template>
	<view>
		<view class="itembox" v-for="(item,index) in list" :key="index" @click="toGoodsdetails(item)">
			<image class="ite-image" :src="path+item.logo"></image>
			<view class="title">{{item.name}}</view>
			<view class="title2">
				<text v-for="(ite,j) in item.tagList":key='j'>{{ite}}</text>
				
			</view>
			<view class="title3">月售：{{(item.monthSell || 0) }}</view>
			<view class="picView">￥<text>{{(item.price/100 || 0).toFixed(2) }}</text></view>
			<view class="gmbtn">购买</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: [null, null, null, null]
			}
		},
		data() {
			return {
				path: this.$http.tpUrl+'/' , // 图片前缀
			};
		},
		onLoad() {
			console.log("====================>>>>>>>>>>>>>>>>>>>>>>>",this.list)
		},
		created(){
			 
		},
		mounted(){
			console.log("====================>>>>>>>>>>>>>>>>>>>>>>>",this.list)
		},
		methods: {
			//详情
			toGoodsdetails(item) {
				let paramsStr=`?ProductEntityId=${item.productEntityId}`
				console.log(paramsStr)
				uni.navigateTo({
					url: `/pages_category_page1/goods/goodsDetails${paramsStr}`
				})
			},
		}
	}
</script>

<style scoped>
	.itembox {
		padding-left: 206rpx;
		padding-right: 164rpx;
		background: #fffbf3;
		border-radius: 20rpx;
		box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(93,69,41,0.25);
		margin-top: 26rpx;
		position: relative;
		overflow: hidden;
		height: 178rpx;
		box-sizing: border-box;
		padding-top: 16rpx;
		padding-bottom: 16rpx;
	}
	.itembox .ite-image {
		width: 178rpx;
		height: 178rpx;
		position: absolute;
		left: 0;
		top: 0;
		background-color: #999;
	}
	.itembox .title {
		font-size: 32rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		color: #5d4529;
		margin-bottom: 16rpx;
		
	}
	.itembox .title2 {
		font-size: 24rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		color: #fdab34;
		margin-bottom: 12rpx;
	}
	.itembox .title2 text{
		display: inline-block;
		background: #fff0db;
		border-radius: 10rpx;
		padding: 8rpx 18rpx;
		margin-right: 10rpx;
		text-align: center;
	}
	.itembox .title3 {
		font-size: 24rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		color: #5d4529;
	}
	.itembox .picView {
		position: absolute;
		right: 36rpx;
		top: 20rpx;
		font-size: 24rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		color: #5d4529;
	}
	.itembox .picView text {
		font-size: 40rpx;
	}
	.itembox .gmbtn {
		width: 138rpx;
		height: 52rpx;
		line-height: 52rpx;
		background: #fff0db;
		border-radius: 10rpx;
		position: absolute;
		right: 26rpx;
		bottom: 26rpx;
		font-size: 28rpx;
		font-family: MicrosoftYaHei;
		font-weight: normal; 
		color: #fdab34; 
		letter-spacing: 2.8rpx;
		text-align: center;
	}
</style>